﻿@model RonYee.Models.Book

@{
    ViewBag.Title = "图书编辑";
    Layout = "~/Views/Shared/_LayoutOfSecondPage.cshtml";
}


<script src="@Url.Content("~/Scripts/RongeJs/vanadium.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/RongeJs/CheckValue.js")" type="text/javascript"></script>


<div class="box_padding">
    <h3><i class="ui-icons"></i> 用户信息</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg"><div class="box_padding">
    <div class="border_line">
       @using (Html.BeginForm("SaveEdit", "Book", FormMethod.Post, new { enctype = "multipart/form-data" }))
       {
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.BookId)
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td class="tdName">ISBN</td><td class="tdData">@Model.ISBN</td>
                    <td class="tdName">书名</td><td class="tdData">@Html.TextBoxFor(model => model.BookName)</td>
                </tr>
                <tr>
                    <td class="tdName">出版社</td><td class="tdData">@Html.TextBoxFor(model => model.Publisher, new { @class = ":required" })</td>
                    <td class="tdName">版本号</td><td class="tdData">@Html.TextBoxFor(model => model.PublishNum, new { @class = ":required" })</td>
                </tr>
                <tr>
                    <td class="tdName">作者</td><td class="tdData">@Html.TextBoxFor(model => model.Author, new { @class = ":required" })</td>
                    <td class="tdName">库存数</td><td class="tdData">@Html.TextBoxFor(model => model.BookCount, new { @class = ":required" })</td>
                </tr>
                <tr>
                    <td class="tdName">原价</td><td class="tdData">@Html.TextBoxFor(model => model.OriginalPrice, new { @class = ":required" })</td>
                    <td class="tdName">打折数值</td><td class="tdData"><input type="text" id="setpercent" value="0.4" name="setpercent" />【数值大小为0-1之间】</td>
                </tr>
                <tr>
                    <td class="tdName">图书分类</td>
                    <td class="tdData">
                    @{
                    List<SelectListItem> selectList = new List<SelectListItem>();
                    selectList.Add(new SelectListItem { Text = "--请选择类型--", Value = "0", Selected = true });
                    foreach (object e in Enum.GetValues(typeof(RonYee.Models.Enum.BookType1)))
                    {
                        selectList.Add(new SelectListItem { Text = Enum.GetName(typeof(RonYee.Models.Enum.BookType1), e), Value = ((int)e).ToString() });
                    }
                       @Html.DropDownList("BookType1", selectList);
                    } 
                    </td>
                    <td class="tdName">图书封面</td>
                    <td class="tdData"><input type="file" name="bookCover" id="bookCover" /></td>
                </tr>
            </tbody>
        </table>
        <input class="Button1 ui-icons" id="save" title="Save" value="保存" type="submit" />
       }
       </div>
    </div>
   </div>
    <div class="box_down ui-icons"></div>
</div>
<div class="line_top">
</div>